﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace UpdateManager {
    /// <summary>
    /// 程序集子项信息实体类
    /// </summary>
    public class AssemblyItemInfo {
        /// <summary>
        /// 插件开发方（作者）
        /// </summary>
        private string author = String.Empty;
        /// <summary>
        /// 插件介绍或版本介绍
        /// </summary>
        private string information = String.Empty;
        /// <summary>
        /// 插件名称（对应平台中插件的文件夹）
        /// </summary>
        private string pluginName = String.Empty;
        /// <summary>
        /// 是否为新上线的模块
        /// </summary>
        private bool isNew = false;
        /// <summary>
        /// 插件中文名称（用于显示）
        /// </summary>
        private string pluginText = String.Empty;
        /// <summary>
        /// 插件发布时间
        /// </summary>
        private DateTime publishDate = DateTime.MinValue;
        /// <summary>
        /// 下载地址
        /// </summary>
        private string updateUrl = String.Empty;
        /// <summary>
        /// 版本
        /// </summary>
        private string version = String.Empty;
        /// <summary>
        /// 旧版本
        /// </summary>
        private string oldVersion = String.Empty;
        /// <summary>
        /// 大小
        /// </summary>
        private string size = String.Empty;
        /// <summary>
        /// 图标地址
        /// </summary>
        private string iconUrl = String.Empty;
        /// <summary>
        /// 程序集类型
        /// </summary>
        private AssemblyType type = AssemblyType.MainSoftware;
        /// <summary>
        /// 是否提标
        /// </summary>
        private bool isTip = true;

        /// <summary>
        /// 获取或设置是否提示
        /// </summary>
        public bool IsTip {
            get { return isTip; }
            set { isTip = value; }
        }

        /// <summary>
        /// 获取或设置插件开发方（作者）
        /// </summary>
        public string Author {
            get {
                return author;
            }
            set {
                author = value;
            }
        }

        /// <summary>
        /// 获取或设置插件介绍或版本介绍
        /// </summary>
        public string Information {
            get {
                return information;
            }
            set {
                information = value;
            }
        }

        /// <summary>
        /// 获取或设置是否为新上线的模块
        /// </summary>
        public bool IsNew {
            get {
                return isNew;
            }
            set {
                isNew = value;
            }
        }

        /// <summary>
        /// 获取或设置程序集名称（对应平台中插件的文件夹）
        /// </summary>
        public string AssemblyName {
            get {
                return pluginName;
            }
            set {
                pluginName = value;
            }
        }

        /// <summary>
        /// 获取或设置程序集中文名称（用于显示）
        /// </summary>
        public string AssemblyText {
            get {
                return pluginText;
            }
            set {
                pluginText = value;
            }
        }

        /// <summary>
        /// 获取或设置程序集发布时间
        /// </summary>
        public DateTime PublishDate {
            get {
                return publishDate;
            }
            set {
                publishDate = value;
            }
        }

        /// <summary>
        /// 获取或设置下载地址
        /// </summary>
        public string UpdateUrl {
            get {
                return updateUrl;
            }
            set {
                updateUrl = value;
            }
        }

        /// <summary>
        /// 获取或设置版本
        /// </summary>
        public string Version {
            get {
                return version;
            }
            set {
                version = value;
            }
        }

        /// <summary>
        /// 获取或设置旧版本
        /// </summary>
        public string OldVersion {
            get {
                return oldVersion;
            }
            set {
                oldVersion = value;
            }
        }

        /// <summary>
        /// 获取或设置大小
        /// </summary>
        public string Size {
            get {
                return size;
            }
            set {
                size = value;
            }
        }
        /// <summary>
        /// 获取或设置图标地址
        /// </summary>
        public string IconUrl {
            get {
                return iconUrl;
            }
            set {
                iconUrl = value;
            }
        }

        /// <summary>
        /// 获取或设置程序集类型
        /// </summary>
        public AssemblyType Type {
            get {
                return type;
            }
            set {
                type = value;
            }
        }

    }
}
